UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FkAbDoeHs+Cfm3ymddMp3WIg5s++jWV6atpJKmPN/R0='
WHERE
key_id = 'e5cb6b4fc29f8598e847a6a0cfdf55675574914e392aaa015fa56a0b05e5049b'
AND (
token = 'FkAbDoeHs+Cfm3ymddMp3WIg5s++jWV6atpJKmPN/R0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)