UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'TutqHW4tPrnHs2Qd4x0s2NljbtubVa3NCiV+f9n2QFE=' 
WHERE 
  key_id = 'eac30bac44ea3ddac6cfdae16be5912662f284ae198bd82592afb35775958f1f' 
  AND (
    token = 'TutqHW4tPrnHs2Qd4x0s2NljbtubVa3NCiV+f9n2QFE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027