UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1sBEt/MmmyW4hoNLVIo3bycZJckfBujCTFSMoskcVzk=' 
WHERE 
  key_id = '1411ae82ebae2a3148f919fc167e5d9b862ccda4fa278ec036a381288eeff1a2' 
  AND (
    token = '1sBEt/MmmyW4hoNLVIo3bycZJckfBujCTFSMoskcVzk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035