UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9NoRTVOBg3pZ6tJUdOabA+JeNp4mqAhsrZCbxQ4Gs7Y='
WHERE
key_id = '755dce7b251e187c701f08d6dc3a1e79f6bba6b720fe5392a54bd141f0c409d8'
AND (
token = '9NoRTVOBg3pZ6tJUdOabA+JeNp4mqAhsrZCbxQ4Gs7Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)