UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0/j0SVQjXP46O0z0KgbSqWuJMc5HRdvMyZ4mlWMcWqc='
WHERE
key_id = '83b8cc83c34b7112121e078cab5f9430109c72f43fe7f8bf1388ee0df96cffbd'
AND (
token = '0/j0SVQjXP46O0z0KgbSqWuJMc5HRdvMyZ4mlWMcWqc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)