UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5SUQxDWFgVbWoev8mVbrQ5k5RbmLCtjsa3fXymcO7nk='
WHERE
key_id = '67fa6589ebbe1dd9179555d422a2d5e4405287c2cf0cc57ef8a04cec3f8606a4'
AND (
token = '5SUQxDWFgVbWoev8mVbrQ5k5RbmLCtjsa3fXymcO7nk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)