UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'MYeKxYKA/MtErxMkylpjf8C2eE/nAEZI8Tri3++3POA=' 
WHERE 
  key_id = '7950da5d9b8a4b39c695ffc95141cf8a100afe5ac34fa25479f9b2c55e08fc33' 
  AND (
    token = 'MYeKxYKA/MtErxMkylpjf8C2eE/nAEZI8Tri3++3POA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00039