UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0dcHMw9Hs1DtVKJR2VsGt/yXpt1nj4BCv7d45OtCE7A='
WHERE
key_id = '76d6d5224840079a00de5f41fc6c7372833865b12870cf1e83c8e0f65cb4a961'
AND (
token = '0dcHMw9Hs1DtVKJR2VsGt/yXpt1nj4BCv7d45OtCE7A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)