UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PTOFSMU/wknCvSsoTiQdbe2yw0N87DAcvUWEZ14dDyk='
WHERE
key_id = '2552adb25755c83fdfa9ba5e05f88aa8194232e5dff5ded8dc8f0e22407c8642'
AND (
token = 'PTOFSMU/wknCvSsoTiQdbe2yw0N87DAcvUWEZ14dDyk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)