UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yxGvYa5hUKciJKJSMuCQKI5FXYYuihPibhTjeGPu1XU='
WHERE
key_id = 'd4b361daeb247fcc48250c3df7f051d4f6e801c7891e573c261dceedb3da81b3'
AND (
token = 'yxGvYa5hUKciJKJSMuCQKI5FXYYuihPibhTjeGPu1XU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)