UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mLvD2P+V8qHIvMDs1tb8hjnGyv9rc8e2GUTgOhVmHjY='
WHERE
key_id = '981116875a813c530dc1d38a48758b554417e851512a764f89f44ba00eb67614'
AND (
token = 'mLvD2P+V8qHIvMDs1tb8hjnGyv9rc8e2GUTgOhVmHjY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)