UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4Q1uTQQYrEcYpj6avHveEbxQaWDNJwR/uTR9Mvms9FM='
WHERE
key_id = '5e10a0282860134fb54517bd2f18e291af7a496c8f655d532be45404d350efd6'
AND (
token = '4Q1uTQQYrEcYpj6avHveEbxQaWDNJwR/uTR9Mvms9FM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)