UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Mdpy2Vhbay2AKB7CQUHPvwfd2pMyBWo0kxHKw3Ewae4=' 
WHERE 
  key_id = '28097c8a3de3cd7307b1f6c2cf62f425babd672fb6ac625e769dd598142bc896' 
  AND (
    token = 'Mdpy2Vhbay2AKB7CQUHPvwfd2pMyBWo0kxHKw3Ewae4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00069