UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1us27CulniPb2xL7TQ+CiztHklS8U46k49wK1fvk/EI=' 
WHERE 
  key_id = '60aeb1903c819e7b2935ca38601717e26c223e8a2d6c6c9dd7b5a674f01a75b2' 
  AND (
    token = '1us27CulniPb2xL7TQ+CiztHklS8U46k49wK1fvk/EI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031