UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'j6urJR3thKl2eXxmhPI3wmb/yvVe17yH9eX4IGEJfJQ='
WHERE
key_id = '750ab45368804f87c517624cc789fb3964c89539d1f12f864d1fc8f2223ee2d5'
AND (
token = 'j6urJR3thKl2eXxmhPI3wmb/yvVe17yH9eX4IGEJfJQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)