UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wVZyJsMvtOCikxiyrnm/OpQ3r4oA//VQXEgIn/PxuTo='
WHERE
key_id = '3b22d5d2f6213537db410eb799c549306884d1bb5a74d6f4177e5937646db48d'
AND (
token = 'wVZyJsMvtOCikxiyrnm/OpQ3r4oA//VQXEgIn/PxuTo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)