UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IyniW/pUCWOyDc/jPvTRPE80pJess2MpAfxjcChf7AQ=' 
WHERE 
  key_id = 'c1c7548e1af9be120541de10c0b062cbf9c8a02524b563336d654fa0d8a8fe51' 
  AND (
    token = 'IyniW/pUCWOyDc/jPvTRPE80pJess2MpAfxjcChf7AQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029