UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4fdkVYO1sdgj4hCCuQEAvMRjnLeHcAkzAONpIoa5GvA='
WHERE
key_id = '60d303d4e5c7ab33a1827fa827ce615e13760bab8364fe978ba6dca236121c25'
AND (
token = '4fdkVYO1sdgj4hCCuQEAvMRjnLeHcAkzAONpIoa5GvA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)