UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'hwXwqASrhbEz4tCjdVEoz3iI/6sJoXMloFQIiuWVg80=' 
WHERE 
  key_id = '44b8f89aa0920af101d2a22bea795348c963c028273a25b593dbe8357087552a' 
  AND (
    token = 'hwXwqASrhbEz4tCjdVEoz3iI/6sJoXMloFQIiuWVg80=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018