UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fuQcz5Uez3R7pp+d/N5XoJxZMxqhouYBQMLcnIxg790=' 
WHERE 
  key_id = 'eefdb3555c48da57a44b37ad6b79b24952680a330eb01149e5ae44c7e5061a6a' 
  AND (
    token = 'fuQcz5Uez3R7pp+d/N5XoJxZMxqhouYBQMLcnIxg790=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032