UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PxlFhw+JPS9gDlWQuPR5Y1sv6FvTdSS/l+uZfXW3zCw='
WHERE
key_id = '38d6ee6a0eec2effaa51e2eef010ec69da4da5e1eff48415b6afcdcd483efcaa'
AND (
token = 'PxlFhw+JPS9gDlWQuPR5Y1sv6FvTdSS/l+uZfXW3zCw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)