UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'V3kRFm45NfUmC+iwidWZb5I3hpJTrTv9EQWeb5MdT10=' 
WHERE 
  key_id = '0a6e54eda6585fbfdaf90fe05f21992b58e4ebe286fd10f04255de8f00f57068' 
  AND (
    token = 'V3kRFm45NfUmC+iwidWZb5I3hpJTrTv9EQWeb5MdT10=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022