UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'OBKIXDfRXIAi/DDbXQbJs6u5ieEHKsnpD9G3KDt5fJc='
WHERE
key_id = '02c7ccdee8ca7e15f7f419a3fcce12f19ac2f9a2afd9ec7431b03ae23898ed4d'
AND (
token = 'OBKIXDfRXIAi/DDbXQbJs6u5ieEHKsnpD9G3KDt5fJc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)