UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iCh4SaDonvK5zo3XX+yT5l1ob8RSo37/MHIBCdl6fV4=' 
WHERE 
  key_id = 'fe7c41f831fb8a63d9f35f103a724c6aac5c3698e43b03a0cbf39613a9d9aa8a' 
  AND (
    token = 'iCh4SaDonvK5zo3XX+yT5l1ob8RSo37/MHIBCdl6fV4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00026