UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1N+iFi/tsMrLPcVH8TBK68nowvovvR8ug4kQNfLpYhw='
WHERE
key_id = '7ba88ef298be2ff22d6bc5f94e3c14c2e60567e186462b4b51ba938ddbb7e02e'
AND (
token = '1N+iFi/tsMrLPcVH8TBK68nowvovvR8ug4kQNfLpYhw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)