UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pWYrD2oSNWlOQHqx/Esy+rns/rQLLXyMGRUy2DjFdGc='
WHERE
key_id = '3a3f8bb18e520b6f1dbcdd2dc046971c7b0a4828f4d6f3a61eeb4efa80810b01'
AND (
token = 'pWYrD2oSNWlOQHqx/Esy+rns/rQLLXyMGRUy2DjFdGc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)