UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/3n5LuExLn5mqOL0f/XcawknkKhvqUioGt+BnscCmgg='
WHERE
key_id = '4069fc846caa4bca5f6a4db8d3ac18b77739aa67983a66cf54037645033d5f6a'
AND (
token = '/3n5LuExLn5mqOL0f/XcawknkKhvqUioGt+BnscCmgg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)