UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eXC5ZDZn29zXwT0l0BTkYpNYCe1zglYXcNb4ZZUx5E4=' 
WHERE 
  key_id = 'cc84226f3a152c089d815d1ff0dcb59376ddb845d7e5eed8dd50cf93098de249' 
  AND (
    token = 'eXC5ZDZn29zXwT0l0BTkYpNYCe1zglYXcNb4ZZUx5E4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024