UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vQ4Nbk9Ozf+nPbkXfBnrrF+0h4A7m67dwnYPwUb7hSs='
WHERE
key_id = '8943d5cf16b2f5826e78e863fa03ff55a060722e7f82ea037d30bb46c0ac02dd'
AND (
token = 'vQ4Nbk9Ozf+nPbkXfBnrrF+0h4A7m67dwnYPwUb7hSs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)