UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+fNvOiuoASwzwqZRJSlmSjqESahz1DJI/PteXxiKuC0='
WHERE
key_id = '8cf4654e88bfa1b917819bd2a9f72e5cb83c02d90f4d0f2d673fc5bfe4f18e47'
AND (
token = '+fNvOiuoASwzwqZRJSlmSjqESahz1DJI/PteXxiKuC0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)