UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7ZuKQ5IWdxMz4KoRkV9dnE3JEVHK1UZS5yS1JB8Qs5s='
WHERE
key_id = '55488f04ace948599cb09ab9d25f2cbfdfdbb6b7fc744be16e579075cba49e25'
AND (
token = '7ZuKQ5IWdxMz4KoRkV9dnE3JEVHK1UZS5yS1JB8Qs5s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)