UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '672Zp4B0dlwVSGIAgwuHW+XRX3vYiUn84sgzM6wjwmI='
WHERE
key_id = '03d4c0f0bee893df5bdc2c7a1d7a6e4b2339dff44b02da437babd32d0aa80409'
AND (
token = '672Zp4B0dlwVSGIAgwuHW+XRX3vYiUn84sgzM6wjwmI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)