UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pT3f/mu82LxnglJZSBcxBl6AiUxBnhVLhJftjflee/g='
WHERE
key_id = '05b29a343ca44e7a12566d57eeba054c0ca56e56859798580359148630131a2f'
AND (
token = 'pT3f/mu82LxnglJZSBcxBl6AiUxBnhVLhJftjflee/g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)