UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M0k3eRhmH3fpA5a4k6KKtGUfHRm+WP3pgzPgPFy5IXc='
WHERE
key_id = '953e4084341de222abf3b5d65f723a7f471a69d16f83729d8e8307e4583532ad'
AND (
token = 'M0k3eRhmH3fpA5a4k6KKtGUfHRm+WP3pgzPgPFy5IXc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)