UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PyqHPbZ0PJey+THbLP3PyEtjSS8O2yG/eKxiS2fvFmk='
WHERE
key_id = 'e76c908feecfa4e920410639083f8931fd6da57e41b4da9f57ba57f5a9bf5ef2'
AND (
token = 'PyqHPbZ0PJey+THbLP3PyEtjSS8O2yG/eKxiS2fvFmk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)