UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/Isbbm38/FZKcwR5KoH9fLcH6r1SdsKI9j1mKZSi2Is='
WHERE
key_id = '738708a696ca30e795b3f8511efecc0552ff15164e09d6a4c5bdc1a2c006cab2'
AND (
token = '/Isbbm38/FZKcwR5KoH9fLcH6r1SdsKI9j1mKZSi2Is='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)