UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EbJd5IwNcm9YM/aBYpO+Qoa/CAT+mHPaRAQgQ8f31jo='
WHERE
key_id = '17060f0750ef19efbad3e24c2d157a0eec3764ae301338c170530048c96e68d2'
AND (
token = 'EbJd5IwNcm9YM/aBYpO+Qoa/CAT+mHPaRAQgQ8f31jo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)