UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'E/GA2HpEcNKG2G26U+mFu69lhz1nJCbElSoaIXXHmMM='
WHERE
key_id = '0b940be7b569aa2b2fc2b4d47cd786d70b53895e225725733287c639a08ee18f'
AND (
token = 'E/GA2HpEcNKG2G26U+mFu69lhz1nJCbElSoaIXXHmMM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)