UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+/ebhjaL95VKEPx8GzXprWGTjot8EbYc/FfTRAoRd+E='
WHERE
key_id = '8e068b3c4e33a88aa3bb910a5935b227f81f8a68d199bddede1754f0e1cc4e47'
AND (
token = '+/ebhjaL95VKEPx8GzXprWGTjot8EbYc/FfTRAoRd+E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)