UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'UVn7iNxkIfWn/etSDyqJrpg452TgxPZFwb/GOL46N38=' 
WHERE 
  key_id = '85eb9b8ae05d3728c601f28baa90476938fe9ab3119fcf030245e6117817b123' 
  AND (
    token = 'UVn7iNxkIfWn/etSDyqJrpg452TgxPZFwb/GOL46N38=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026