UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+U1z6h5VxOZRGKUuy7ekjj3EeVMj6z6Rk8Ke6QIzoz0='
WHERE
key_id = '94fc2315dc2a5b2cd049078db93a265e08c71373cbfb7273fbf0098cdc3d4858'
AND (
token = '+U1z6h5VxOZRGKUuy7ekjj3EeVMj6z6Rk8Ke6QIzoz0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)