UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eLzDqUPGc5I7EdftFTVi5iMdN0bE7aUpLXD6nlBnTWQ='
WHERE
key_id = '8ac493e3412ce880b45afb9f69af39037e0644177b5a06f9cc68eee0a65e6d86'
AND (
token = 'eLzDqUPGc5I7EdftFTVi5iMdN0bE7aUpLXD6nlBnTWQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)