UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '38C//WAsuNfQLQXr0rFouJWft4GHOQPBnUdI80uj2mk='
WHERE
key_id = '5e7a7a553e58d738b2f5105688241f6e247d1d5efd6b321ad80d509c7a2eecd4'
AND (
token = '38C//WAsuNfQLQXr0rFouJWft4GHOQPBnUdI80uj2mk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)