UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JyxmdSjDWlKzaggeMObyXPavfDuxkdkAnjOwF+KawtY=' 
WHERE 
  key_id = 'e44f6190237a16d6225aac9ceaf910d6b761a7139a2a680c253481b177296041' 
  AND (
    token = 'JyxmdSjDWlKzaggeMObyXPavfDuxkdkAnjOwF+KawtY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032