UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ZNe5rsc7u740kECdDbsW+ezwmGHr8Y88aJ3AbdCah8M=' 
WHERE 
  key_id = '3f8f81ee45ed6e48759c92d36dd0a7d2da5ef50c9c4306ca4c62291ab9681ada' 
  AND (
    token = 'ZNe5rsc7u740kECdDbsW+ezwmGHr8Y88aJ3AbdCah8M=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019