UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FKIBINhyOInE3yHuzPha9RJ/mWCjQfiXc7Jvj8ZPbTo='
WHERE
key_id = '0d6f905d490b16e5332d252973fcc591bdafeabd6048819363672fd0c99f8df3'
AND (
token = 'FKIBINhyOInE3yHuzPha9RJ/mWCjQfiXc7Jvj8ZPbTo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)