UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vTQ78Pb4yzX2aeJiYb/bDid20n0mUGcFEF0XItTotDI='
WHERE
key_id = '81e3e86baccf169d9ccb1b1d5d167cedb81bb6e9f2450f33781912fa6a428d65'
AND (
token = 'vTQ78Pb4yzX2aeJiYb/bDid20n0mUGcFEF0XItTotDI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)