UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'qxzoh1XPOsVLpTL/1/VnVtC38EJDWDNO5FobVZHHpwY=' 
WHERE 
  key_id = '2c81f5e2d33c998358c138f2dc5a7ac2d0c8def6427b5b8eea51b74b7999ebcf' 
  AND (
    token = 'qxzoh1XPOsVLpTL/1/VnVtC38EJDWDNO5FobVZHHpwY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00064