UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/y66qRpi1k3O+vljFv7gBbb7U4C8Bru2C6nX76+cqXs='
WHERE
key_id = '71b2b9cf84a940dbf93f012471d8a3a4abce35299d6c6133cd25ac0cb7e1402a'
AND (
token = '/y66qRpi1k3O+vljFv7gBbb7U4C8Bru2C6nX76+cqXs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)